#include<sys/types.h>
#include<sys/ipc.h>
#include<sys/shm.h>
#include<stdio.h>
#include<sys/wait.h>
#include<unistd.h>
#include<stdlib.h>

int main(){
	
	key_t key=194;
	int shimid_1,shimid_2;
	if( ( shimid_1 = shmget(key,1000,0644|IPC_CREAT) ) == -1){
		perror("shmget shimid_1");
		exit(1);
	}
	printf("First shared memory identifier is %d\n",shimid_1);

	if( ( shimid_2 = shmget(IPC_PRIVATE,20,0644 ) == -1)){
		perror("shmget shimid_2");
		exit(2);
	}
	printf("Second shared memory identifier is %d\n",shimid_2);
	exit(0);
}
